import { set } from "nprogress";
import Vue from "vue";
const _this = Vue.prototype;

const state = {
    assectInfo: {}, // 信息
  selectPersonnel:[],
  // 存放页面间返回的数据
  returnData: null,
  deptMemberTree:null, // 选择责任人树结构数据
  orgTree:null, // 内部组织树结构数据
  propertyTypeTree:null, // 资产类型树结构数据
  projectTree:null, // 所属项目树结构数据
  listTree:null, // 资产用途树结构数据
};
const getters = {
    userName(state) {
        return state.userInfo.userName;
    }
};
const actions = {

};
const mutations = {
  setlistTree(state,value){
    state.listTree=value
  },
  setdeptMemberTree(state,value){
    state.deptMemberTree=value
  },
  setorgTree(state,value){
    state.orgTree=value
  },
  setpropertyTypeTree(state,value){
    state.propertyTypeTree=value
  } ,
  setProjectTree(state,value){
    state.projectTree=value
  },
  setAssectInfo(state,value){
    state.assectInfo = value
  //  console.log(state.assectInfo,'assssssssinfo')
  },
  setSPersonnel(state,value){
    state.selectPersonnel=value
  }
  ,
  // 用于页面间通过 Vuex 传递返回数据
  setReturnData(state, value) {
    // 保持在模块内，覆盖之前的数据
    state.returnData = value
  }
};
export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations
};
